package com.zhangfb95.crosschain.plugin.container.java.fabric2.infra.model.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhangfubing
 * @since 2024/1/10
 */
@AllArgsConstructor
@Getter
public enum EventHandleStatusEnum {

    WAIT("wait"),
    FAIL("fail"),
    SUCCESS("success"),
    IGNORED("ignored"),
    ;

    private final String code;

    public static boolean shouldHandle(String code) {
        return WAIT.code.equals(code) || FAIL.code.equals(code);
    }
}
